﻿namespace Vkontakte.Api.Operations
{
	[ApiMethod("places.getTypes")]
	public sealed class PlacesGetTypes
		: Base30ApiOperation
	{
		private PlaceType[] _result;
		protected override void Compile()
		{
			AddParameter("method", "places.getTypes");
			base.Compile();
		}

		protected override void ParseData(string data)
		{
			ListingResponce responce = Serializer.LoadObjectXmlString<ListingResponce>(data);
			_result = responce.PlaceTypes;
			base.ParseData(data);
		}

		public PlaceType[] GetResult()
		{
			return _result;
		}
	}
}